package com.example.kotlinstudy.bean

//初始化顺序
class Student(_name: String, val age: Int) {
    var xl = "hello"
    var score = 10
    var name = _name

    private val hobby = "Music"
    val subject: String

    init {
        println("initializing  student ...")
        subject = "math"
    }

    constructor(_name: String) : this(_name, 10) {
        score = 20
    }

}
fun main(){
    Student("lzj")
}
